home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1984 Half 1 / rerun-1984-01-06-side-b.d64 / zelaz64 jan p42 (.txt) < prev   
Commodore BASIC  |  2022-09-20  |  6KB  |  151 lines

  1. 5 printchr$(147)
  2. 10 print"****************************************"
  3. 12 print"*                                      *"
  4. 14 print"*     canyons of zelaz                 *"
  5. 16 print"*     copyright 1983                   *"
  6. 18 print"*     wizardworks software             *"
  7. 20 print"*                                      *"
  8. 22 print"*     written by gary d mcclellan      *"
  9. 24 print"*     p.o. box 1750                    *"
  10. 26 print"*     flagstaff, az  86002             *"
  11. 28 print"*                                      *"
  12. 30 print"****************************************"
  13. 60 of=54272:gosub500:gosub900:ti$="000000":ff=16:y=71:pokev+1,y:gosub400
  14. 97 rem**********************************
  15. 98 rem*   main program loop            *
  16. 99 rem**********************************
  17. 100 cs=0:cp=0:pokev+31,0:j=peek(56320)
  18. 105 if(jand16)or(fu<1)thenc1=-9:pokead,o:pokewa,0:goto150
  19. 107 poke54296,15:pokead,88:pokesr,240:pokewa,129:fu=fu-3.5:c1=5.5:poke2040,14
  20. 110 ifnotjand8thenx1=x1+.25:fu=fu-.5
  21. 112 ifnotjand4thenx1=x1-.25:fu=fu-.5
  22. 113 ifnotjand1thenfu=fu+1.75:c1=32
  23. 150 poke55296,2:poke55326,2:c2=64/c1:v2=v1-.4+.2*c2:a2=a2+.1*(v1+v2):v1=v2
  24. 155 cp=peek(v+31)and1:ifcp=0thencr=0
  25. 176 y=(222-int(a2/d)):x=x+x1:ify<55thenx1=x1*2
  26. 177 ifx<1orx>254ory<45thengosub300
  27. 178 poke53279,0:pokev,x:pokev+1,y:ifpeek(53279)and1thencr=cr+1:ifcr>1thencs=1
  28. 180 printh$p$p$p$chr$(17)tab(32)ti$:printp$tab(33)str$(int(fu))+" "
  29. 185 printp$tab(33)str$(int(a2))+" ":printp$tab(32)"v:"str$(int(v2))+" "
  30. 186 hv$=str$(x1*3)+"    ":printtab(32)"h:"left$(hv$,5)
  31. 190 ff=peek(v+30)and30:ifffthengosub400
  32. 195 if(y>222andv2<-10)orcsthengosub300
  33. 200 poke55296,7:poke55326,7:poke2040,15:goto100
  34. 297 rem ********************************
  35. 298 rem * mission report routine       *
  36. 299 rem ********************************
  37. 300 pokenh,2:pokenl,179:poke54296,15:pokead,88:pokesr,240:pokewa,129:ck=1
  38. 304 poke2040,11:pokev+28,1
  39. 305 gosub380:pokev+29,31:gosub380:pokev+23,1:gosub380:gosub390
  40. 310 pokead,00:pokesr,00:pokewa,00
  41. 315 gosub392:printh$p$:printtab(32)"crashed"
  42. 317 pokev+29,30:pokev+23,0:pokev+21,30:pokev+28,0:goto370
  43. 350 gosub392:printh$p$:printtab(32)"aborted":goto370
  44. 360 gosub392:fc=fc-3:iffc>4thenfc=4
  45. 362 printh$p$:printtab(32)"       "
  46. 363 printh$p$:printtab(32)mr$(fc);tab(73)"flight":forj=1to4000:nextj:goto370:
  47. 370 j=peek(56320):ifjand16then370
  48. 371 ifnotjand2thenpokev+21,0:clr:printchr$(147):end
  49. 375 gosub395:gosub900:gosub584:ff=peek(v+30):ff=0:ti$="000000":return
  50. 380 forj=1to25:z=int(60*rnd(1))+1:poke705+z,j:next:return
  51. 390 forj=704to766:pokej,00:next:return
  52. 392 printh$:printtab(32)r$"mission"tab(72)r$"report:":return
  53. 395 printh$p$:printtab(32)"       "tab(72)"       ":return
  54. 396 rem*********************************
  55. 397 rem* lander sprite/pad sprite      *
  56. 398 rem* collision handler routine     *
  57. 399 rem*********************************
  58. 400 ifv2<-10orabs(x1)>1.5 thengoto300
  59. 403 ifff=16andx<210thengoto300
  60. 405 printh$p$:printtab(32)"landed ":poke2040,15:pokead,0:pokewa,0
  61. 410 ifff=16thengosub495:ifq=1then360
  62. 415 ifff=16thenfu=fu+200
  63. 435 y=y-1:pokev+1,y
  64. 440 ifckthenprinth$p$:printtab(32)"standby":ck=0
  65. 450 forj=1to4:ifff=2^jthenifpeek(v+39+j)and5thenfu=fu+300:pokev+39+j,2:fc=fc+1
  66. 455 poke(v+43),5
  67. 460 nextj:fori=1to1500:next:printh$p$p$:printtab(34)fc
  68. 465 printh$p$p$p$;chr$(17)tab(32)ti$p$:printtab(33)str$(int(fu))+" "
  69. 470 printp$tab(33)str$(int(a2))+" ":printp$tab(32)"v:"str$(int(v2))+" "
  70. 471 hv$=str$(x1*3)+"    ":printtab(32)"h:"left$(hv$,5)
  71. 475 ifnotpeek(56320)and2then350
  72. 480 ifpeek(56320)and16then465
  73. 485 v1=5 :c1=2:x1=0:ff=peek(v+30):ff=0:a2=a2+4
  74. 490 printh$p$:printtab(32)"active!":return
  75. 495 if(notpeek(v+40)and5)and(notpeek(v+41)and5)and(notpeek(v+42)and5)thenq=1
  76. 496 return
  77. 497 rem*********************************
  78. 498 rem* set up sprite data and screen *
  79. 499 rem*********************************
  80. 500 fori=13to15:forj=0to62:reada:poke(i*64)+j,a:nextj:nexti
  81. 504 dimmr$(4):mr$(1)="great":mr$(2)="good":mr$(3)="fair":mr$(4)="poor"
  82. 506 printchr$(147):poke53281,11:poke53280,12:forj=55296to56295:pokej,1:nextj
  83. 508 forj=1055to2023step40:pokej,160:pokej+of,4 :pokej+8,160:pokej+8+of,4 :nextj
  84. 510 forj=1055to1062:pokej,160:pokej+of,4 :pokej+960,160:pokej+960+of,4 :nextj
  85. 512 forj=1249to1252:pokej,160:next:forj=1289to1292:pokej,160:next:poke1288,95
  86. 515 forj=1064to1984step40:pokej,160:pokej+30,160:next
  87. 516 poke1105,223:poke1145,105:poke1225,223:forj=1265to1425step40:pokej,160:next
  88. 517 poke1024,81:poke1024+of,2:poke1054,81:poke1054+of,2
  89. 518 poke1105,223:poke1145,105:poke1225,223:forj=1265to1425step40:pokej,160:next
  90. 520 poke1465,105:poke1745,223:poke1785,160:poke1825,105:poke1905,223
  91. 522 poke1945,160:poke1946,223
  92. 524 forj=1984to2013:pokej,160:next
  93. 526 poke1093,233:forj=1133to1293step40:pokej,160:next:poke1333,95:poke1413,233
  94. 530 forj=1453to1893step40:pokej,160:next:poke1933,95:poke1973,233
  95. 532 poke1172,233
  96. 535 poke1352,223:poke1353,233:poke1391,233:poke1394,105
  97. 536 forj=1392to1552step40:pokej,160:next:forj=1393to1953step40:pokej,160:next
  98. 538 poke1431,95:poke1592,95:poke1672,95
  99. 539 poke1752,233:poke1792,160:poke1832,160:poke1872,95:poke1791,233:poke1831,95
  100. 542 poke1471,233:poke1511,160:poke1551,95:poke1510,233
  101. 545 poke1434,223:poke1474,160:poke1514,105:poke1554,223:poke1594,160
  102. 547 poke1595,223:forj=1634to1954step40:pokej,160:pokej+1,160:next
  103. 549 poke1716,233:poke1717,223:poke1757,105:poke1797,223:poke1837,105
  104. 550 poke1876,105:poke1916,223:poke1956,105:forj=1756to1836step40:pokej,160:next
  105. 552 rem right pinnacle
  106. 554 poke1442,223:poke1443,223:poke1444,233:poke1445,223:poke1485,105
  107. 556 poke1481,95:forx=1482to1602step40:pokex,160:next
  108. 558 forj=1483to1963step40:pokej,160:pokej+1,160:next
  109. 560 forj=1525to1965step40:pokej,160:next:forj=1526to1606step40:pokej,160:next
  110. 565 forj=1766to1966step40:pokej,160:next:poke1646,105:poke1726,223
  111. 567 poke1486,233:poke1567,105:poke1807,223
  112. 570 poke1967,233:poke1968,233:poke1451,95:poke1452,160:poke1651,233:poke1691,95
  113. 573 poke1492,233:forj=1492to1812step40:pokej,160:next:poke1852,95
  114. 575 poke1521,233:poke1561,95:poke1642,95:poke1723,95:poke1763,32:poke1803,233
  115. 577 poke1842,233:poke1882,95:poke1922,233
  116. 584 p$=chr$(17)+chr$(17)+chr$(17):h$=chr$(19):r$=chr$(18)
  117. 585 printh$;chr$(5  ):printtab(32)r$"mission"tab(72)r$"status:"
  118. 587 printh$p$p$;chr$(17):printtab(32)r$" time: ":printp$tab(32)r$" fuel: "p$
  119. 591 printtab(32)r$" alt:  "p$:printtab(32)r$" vel:  "
  120. 596 printh$p$p$tab(32)r$"refuels"
  121. 597 return
  122. 896 rem*********************************
  123. 897 rem* define and enable sprites     *
  124. 898 rem* 1 thru 5 and game variables   *
  125. 899 rem*********************************
  126. 900 v=53248:x=219:y=70:d=3:cr=0:pokev+31,0:fu=0:a2=456:v1=0:x1=0
  127. 910 pokev+21,31:poke2040,15:pokev,x:pokev+1,y:pokev+27,1:ck=1:q=0:v2=0
  128. 916 poke2041,13:poke2042,13:poke2043,13:poke2044,13
  129. 918 pokev+2,48:pokev+3,242:pokev+4,124:pokev+5,242:pokev+6,215:pokev+7,242
  130. 919 pokev+8,210:pokev+9,90
  131. 920 pokev+39,15:pokev+40,5:pokev+41,5:pokev+42,5:pokev+43,2
  132. 922 pokev+29,30:pokev+37,7:pokev+38,2
  133. 930 forj=54272to54296:pokej,0:next:wa=54276:ad=54277:sr=54278:nl=54272:nh=54273
  134. 940 pokenl,216:pokenh,12:fc=0
  135. 950 return
  136. 996 rem*********************************
  137. 997 rem* data for sprite data block    *
  138. 998 rem* 13, 14, and 15                *
  139. 999 rem*********************************
  140. 1000 data255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
  141. 1002 data255,255,255,255,255,255,255
  142. 1003 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  143. 1004 data0,0,0,0,0,0,32,254,24,35,255,160,31,255,216,15,255,192,31,255,192
  144. 1006 data63,255,248,127,255,252,127,255,252,127,255,248,63,255,240,15,255,240
  145. 1008 data19,255,152,38,56,68,120,124,62,64,254,2,64,210,2,64,169,2
  146. 1010 data65,85,2,194,51,131,0,0,0
  147. 1012 data0,0,0,32,254,24,35,255,160,31,255,216,15,255,192,31,255,192
  148. 1014 data63,255,248,127,255,252,127,255,252,127,255,248,63,255,240,15,255,240
  149. 1016 data19,255,152,38,56,68,120,124,62,64,254,2,64,0,2,64,0,2
  150. 1018 data64,0,2,192,0,3,0,0,0
  151.